<template>
  <div>
    <!-- 评论列表 -->
    <h2>评论列表</h2>
    <!-- <h2>待审核评论</h2>   -->
    <el-table border :data="tableData">
      <el-table-column prop="rid" label="编号" width="80"></el-table-column>
      <el-table-column prop="pubtime" label="发布时间" width="100"></el-table-column>
      <el-table-column prop="publisher" label="发布人" width="120"></el-table-column>
      <el-table-column prop="conten" label="内容" show-overflow-tooltip></el-table-column>
      <el-table-column prop="commodity" label="对应商品" width="180"></el-table-column>
      <el-table-column prop="seller" label="对应商家" width="120"></el-table-column>
      <el-table-column prop="state" label="审核状态" width="80">
         <!-- 0:审核未通过  1:审核通过 2:待审核 -->
        <!-- <template slot-scope="scope">{{scope.row.state?'待审核':'通过'}}</template> -->
        <template slot-scope="scope">
          <span v-if="scope.row.state==0">审核通过</span>
          <span v-if="scope.row.state==1">待审核</span>
          <span v-if="scope.row.state==9">禁用</span>
        </template> 
      </el-table-column>
      <el-table-column label="操作" align="center">
        <el-button type="primary">详情</el-button>
        <el-button type="success">通过</el-button>
        <el-button type="danger">禁用</el-button>
      </el-table-column>  
    </el-table>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        tableData: [
          {rid:'1001', pubtime: '2022/7/1',publisher:'亮亮',conten: '性价比高，品质优异性价比高，品质优异性价比高，品质优异性价比高，品质优异性价比高，品质优异',commodity: '商品名字或者缩略图', seller:'商家名',state: 0},
          {rid:'1002', pubtime: '2022/7/1', publisher:'小宇',conten: '实物和图一样无色差',commodity:'商品名字或者缩略图', state: 0},
          {rid:'1003', pubtime: '2022/7/1', publisher:'小新',conten: '店家很热情',commodity:'商品名字或者缩略图', state: 1},
          {rid:'1004', pubtime: '2022/7/1', publisher:'涛哥',conten: '差评！！！！！', commodity:'商品名字或者缩略图', state: 1},
          {rid:'1004', pubtime: '2022/7/2', publisher:'涛哥',conten: '差差差差评！！！！！', commodity:'商品名字或者缩略图', state: 9},

          ]
      }
    },
  }
</script>